import request from "@/utils/serviceApiH2";

/* 账号管理 */

// 获取验证码
export function getCodeByMobileApi(data) {
  return request({
    url: "/apiH2/member/company/account/getCodeByMobile",
    method: "POST",
    data
  });
}

// 企业建议反馈
export function AddCompanyFeedbackApi(params) {
  return request({
    url: "/apiH2/member/company/account/AddCompanyFeedback",
    method: 'POST',
    params
  });
}


// 根据id查询企业账户信息
export function selAccountMessageByUidApi(uid) {
  return request({
    url: `/apiH2/member/company/account/selAccountMessageByUid/${uid}`,
    method: "GET",
  });
}

// 根据id查询企业登录日志
export function selLoginLogApi(params) {
  return request({
    url: `/apiH2/member/company/account/selLoginLog/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}


// 根据mobile修改企业密码
export function updateAccountByMobileApi(data) {
  return request({
    url: `/apiH2/member/company/account/updateAccountByMobile`,
    method: "PUT",
    data
  });
}

// 校验验证码
export function checkCodeApi(data) {
  return request({
    url: "/apiH2/member/company/account/checkCode",
    method:'POST',
    data
  });
}

// 修改手机号
export function updateMobileByUidApi(params) {
  return request({
    url: `/apiH2/member/company/account/updateMobileByUid/${params.uid}`,
    method: "PUT",
    params: {
      newMobile: params.newMobile,
    },
  });
}